export default {
  xdataControlName: 'grid',
  loadDefault: true,
  deviewCodeName: 'grid_logic_base',
  deviewId: '28357a3c2279b18ccd8524ef0a728329',
  appWFId: 'workflow',
  accUserMode: 2,
  capLanguageRes: {
    lanResTag: 'DE.LNAME.MASTER',
  },
  caption: '表格_基础事件',
  codeName: 'master_grid_logic_base',
  appDataEntityId: 'web.master',
  appViewMsgGroupId: 'event_and_call',
  viewLayoutPanel: {
    viewProxyMode: true,
    layoutMode: 'FLEX',
    layout: {
      layout: 'FLEX',
    },
    rootPanelItems: [
      {
        actionGroupExtractMode: 'ITEM',
        panelItems: [
          {
            actionGroupExtractMode: 'ITEM',
            panelItems: [
              {
                actionGroupExtractMode: 'ITEM',
                panelItems: [
                  {
                    caption: '页面标题',
                    itemStyle: 'DEFAULT',
                    itemType: 'CTRLPOS',
                    layoutPos: {
                      shrink: 1,
                      layout: 'FLEX',
                    },
                    showCaption: true,
                    id: 'captionbar',
                  },
                ],
                layout: {
                  align: 'center',
                  layout: 'FLEX',
                },
                dataRegionType: 'INHERIT',
                caption: '容器',
                itemStyle: 'DEFAULT',
                itemType: 'CONTAINER',
                layoutPos: {
                  shrink: 1,
                  heightMode: 'FULL',
                  layout: 'FLEX',
                },
                id: 'view_captionbar',
              },
              {
                actionGroupExtractMode: 'ITEM',
                panelItems: [
                  {
                    editor: {
                      editorType: 'SWITCH',
                      valueType: 'SIMPLE',
                      editable: true,
                      id: 'is_hide',
                    },
                    allowEmpty: true,
                    caption: '开关',
                    itemStyle: 'DEFAULT',
                    itemType: 'FIELD',
                    layoutPos: {
                      shrink: 1,
                      layout: 'FLEX',
                    },
                    id: 'is_hide',
                  },
                  {
                    rawItem: {
                      caption: '是否隐藏描述列',
                      halign: 'LEFT',
                      renderMode: 'PARAGRAPH',
                      valign: 'MIDDLE',
                      wrapMode: 'NOWRAP',
                      contentType: 'RAW',
                      predefinedType: 'STATIC_LABEL',
                      id: 'static_label',
                    },
                    caption: '标签',
                    itemStyle: 'DEFAULT',
                    itemType: 'RAWITEM',
                    layoutPos: {
                      shrink: 1,
                      layout: 'FLEX',
                      spacingLeft: 'OUTERSMALL',
                    },
                    showCaption: true,
                    id: 'static_label',
                  },
                ],
                layout: {
                  align: 'center',
                  dir: 'row',
                  layout: 'FLEX',
                  valign: 'center',
                },
                dataRegionType: 'INHERIT',
                caption: '容器',
                itemStyle: 'DEFAULT',
                itemType: 'CONTAINER',
                layoutPos: {
                  shrink: 1,
                  layout: 'FLEX',
                  spacingLeft: 'OUTERMEDIUM',
                },
                id: 'container',
              },
            ],
            layout: {
              dir: 'row',
              layout: 'FLEX',
            },
            dataRegionType: 'INHERIT',
            caption: '容器',
            itemStyle: 'DEFAULT',
            itemType: 'CONTAINER',
            layoutPos: {
              shrink: 1,
              heightMode: 'FULL',
              layout: 'FLEX',
            },
            id: 'view_header_left',
          },
          {
            actionGroupExtractMode: 'ITEM',
            panelItems: [
              {
                actionGroupExtractMode: 'ITEM',
                panelItems: [
                  {
                    caption: '工具栏',
                    itemStyle: 'DEFAULT',
                    itemType: 'CTRLPOS',
                    layoutPos: {
                      shrink: 1,
                      layout: 'FLEX',
                    },
                    showCaption: true,
                    id: 'toolbar',
                  },
                ],
                layout: {
                  align: 'center',
                  layout: 'FLEX',
                },
                dataRegionType: 'INHERIT',
                caption: '容器',
                itemStyle: 'DEFAULT',
                itemType: 'CONTAINER',
                layoutPos: {
                  shrink: 1,
                  heightMode: 'FULL',
                  layout: 'FLEX',
                },
                id: 'view_toolbar',
              },
            ],
            layout: {
              layout: 'FLEX',
            },
            dataRegionType: 'INHERIT',
            caption: '容器',
            itemStyle: 'DEFAULT',
            itemType: 'CONTAINER',
            layoutPos: {
              shrink: 1,
              heightMode: 'FULL',
              layout: 'FLEX',
            },
            id: 'view_header_right',
          },
        ],
        predefinedType: 'VIEWHEADER',
        layout: {
          align: 'space-between',
          dir: 'row',
          layout: 'FLEX',
          valign: 'center',
        },
        dataRegionType: 'INHERIT',
        caption: '容器',
        itemStyle: 'DEFAULT',
        itemType: 'CONTAINER',
        layoutPos: {
          shrink: 0,
          layout: 'FLEX',
        },
        id: 'view_header',
      },
      {
        rawItem: {
          caption:
            '1、单选数据（主键）：仅在视图参数中传递主键数据\n2、单选数据：在视图参数中传递整行数据\n3、指定视图参数：以单选数据（主键）为基础，额外指定传递【名称】属性数据\n4、输出选择数据：含操作的整行数据\n5、开关控件：动态控制表格列隐藏与显示',
          halign: 'LEFT',
          renderMode: 'TEXT',
          valign: 'MIDDLE',
          wrapMode: 'NOWRAP',
          contentType: 'RAW',
          predefinedType: 'STATIC_TEXT',
          id: 'static_text',
        },
        caption: '文本',
        itemStyle: 'DEFAULT',
        itemType: 'RAWITEM',
        layoutPos: {
          shrink: 1,
          layout: 'FLEX',
          spacingLeft: 'OUTERMEDIUM',
          spacingRight: 'OUTERMEDIUM',
        },
        showCaption: true,
        id: 'static_text',
      },
      {
        actionGroupExtractMode: 'ITEM',
        panelItems: [
          {
            caption: '搜索表单',
            itemStyle: 'DEFAULT',
            itemType: 'CTRLPOS',
            layoutPos: {
              shrink: 1,
              layout: 'FLEX',
            },
            showCaption: true,
            id: 'searchform',
          },
        ],
        layout: {
          dir: 'column',
          layout: 'FLEX',
        },
        dataRegionType: 'INHERIT',
        itemStyle: 'DEFAULT',
        itemType: 'CONTAINER',
        layoutPos: {
          shrink: 0,
          layout: 'FLEX',
        },
        id: 'view_searchform',
      },
      {
        actionGroupExtractMode: 'ITEM',
        panelItems: [
          {
            caption: '表格',
            itemStyle: 'DEFAULT',
            itemType: 'CTRLPOS',
            layoutPos: {
              grow: 1,
              shrink: 1,
              layout: 'FLEX',
            },
            showCaption: true,
            id: 'grid',
          },
        ],
        predefinedType: 'VIEWCONTENT',
        layout: {
          layout: 'FLEX',
        },
        dataRegionType: 'INHERIT',
        caption: '容器',
        itemStyle: 'DEFAULT',
        itemType: 'CONTAINER',
        layoutPos: {
          grow: 1,
          shrink: 1,
          layout: 'FLEX',
        },
        id: 'view_content',
      },
    ],
    layoutPanel: true,
    appViewEngines: [
      {
        engineCat: 'VIEW',
        engineType: 'GridView',
        id: 'engine',
      },
    ],
    appViewLogics: [
      {
        eventNames: 'onRowClick',
        logicTrigger: 'CTRLEVENT',
        logicType: 'SCRIPT',
        ctrlName: 'grid',
        scriptCode:
          "console.log('行单击执行了');\r\nibiz.message.warning('行单击执行了');",
        builtinLogic: true,
        name: 'LOGIC_ROW_CLICK',
        id: 'logic_row_click',
      },
      {
        eventNames: 'onDbRowClick',
        logicTrigger: 'CTRLEVENT',
        logicType: 'SCRIPT',
        ctrlName: 'grid',
        scriptCode:
          "console.log('行双击执行了');\r\nibiz.message.warning('行双击执行了');",
        builtinLogic: true,
        name: 'LOGIC_DB_ROW_CLICK',
        id: 'logic_db_row_click',
      },
      {
        logicTrigger: 'CUSTOM',
        logicType: 'APPUILOGIC',
        builtinAppUILogic: {
          actionAfterWizard: 'DEFAULT',
          newDataAppView: {
            openMode: 'POPUPMODAL',
            refAppViewId: 'web.master_edit_view',
          },
          appUILogicRefViews: [
            {
              openMode: 'POPUPMODAL',
              refAppViewId: 'web.master_edit_view',
            },
          ],
          builtinLogic: true,
          logicType: 'PREDEFINED',
          viewLogicType: 'APP_NEWDATA',
          id: '新建数据',
        },
        builtinLogic: true,
        id: 'newdata',
      },
      {
        logicTrigger: 'CUSTOM',
        logicType: 'APPUILOGIC',
        builtinAppUILogic: {
          openDataAppView: {
            openMode: 'POPUPMODAL',
            refAppViewId: 'web.master_edit_view',
          },
          editMode: true,
          appUILogicRefViews: [
            {
              openMode: 'POPUPMODAL',
              refAppViewId: 'web.master_edit_view',
            },
          ],
          builtinLogic: true,
          logicType: 'PREDEFINED',
          viewLogicType: 'APP_OPENDATA',
          id: '打开数据',
        },
        builtinLogic: true,
        id: 'opendata',
      },
    ],
    appViewRefs: [
      {
        realOpenMode: 'POPUPMODAL',
        realTitle: '主数据编辑视图',
        refAppViewId: 'web.master_edit_view',
        name: 'EDITDATA',
        id: 'editdata',
      },
      {
        realOpenMode: 'POPUPMODAL',
        realTitle: '主数据编辑视图',
        refAppViewId: 'web.master_edit_view',
        name: 'NEWDATA',
        id: 'newdata',
      },
    ],
    controls: [
      {
        detoolbarItems: [
          {
            actionLevel: 100,
            noPrivDisplayMode: 2,
            uiactionId: 'single_data_key@master',
            uiactionTarget: 'SINGLEKEY',
            valid: true,
            caption: '单选数据（主键）',
            itemType: 'DEUIACTION',
            controlLogics: [
              {
                itemName: 'deuiaction1',
                logicTag: 'toolbar',
                logicType: 'SCRIPT',
                scriptCode:
                  'ctrl.state.selectedData && ctrl.state.selectedData.length <= 1\r\n',
                triggerType: 'ITEMENABLE',
                id: 'enable_logic',
              },
            ],
            tooltip: '单选数据（主键）',
            showCaption: true,
            showIcon: true,
            id: 'deuiaction1',
          },
          {
            actionLevel: 100,
            noPrivDisplayMode: 2,
            uiactionId: 'single_data@master',
            uiactionTarget: 'SINGLEDATA',
            valid: true,
            caption: '单项数据',
            itemType: 'DEUIACTION',
            tooltip: '单项数据',
            showCaption: true,
            showIcon: true,
            id: 'deuiaction2',
          },
          {
            actionLevel: 100,
            noPrivDisplayMode: 2,
            uiactionId: 'specify_view_parameters@master',
            uiactionTarget: 'SINGLEKEY',
            valid: true,
            caption: '指定视图参数',
            itemType: 'DEUIACTION',
            tooltip: '指定视图参数',
            showCaption: true,
            showIcon: true,
            id: 'deuiaction3',
          },
          {
            actionLevel: 100,
            noPrivDisplayMode: 2,
            uiactionId:
              'toolbar_grid_logic_base_toolbar_deuiaction4_click@master',
            uiactionTarget: 'SINGLEDATA',
            valid: true,
            caption: '输出多选数据',
            itemType: 'DEUIACTION',
            tooltip: '输出多选数据',
            showCaption: true,
            showIcon: true,
            id: 'deuiaction4',
          },
        ],
        xdataControlName: 'grid',
        codeName: 'grid_logic_base_toolbar',
        controlType: 'TOOLBAR',
        logicName: '表格_事件及调用_工具栏',
        appDataEntityId: 'web.master',
        controlParam: {
          id: 'toolbar',
        },
        modelId: '29bb791c21e9f13c90cf4eb09b6cab36',
        modelType: 'PSDETOOLBAR',
        name: 'toolbar',
        id: 'grid_logic_base_toolbar',
      },
      {
        aggMode: 'NONE',
        columnEnableFilter: 2,
        columnEnableLink: 2,
        groupMode: 'NONE',
        groupStyle: 'DEFAULT',
        orderValueAppDEFieldId: 'px',
        degridColumns: [
          {
            clconvertMode: 'NONE',
            dataItemName: 'name',
            excelCaption: '名称',
            appDEFieldId: 'name',
            valueType: 'SIMPLE',
            aggMode: 'NONE',
            align: 'LEFT',
            capLanguageRes: {
              lanResTag: 'DEF.LNAME.MASTER.NAME',
            },
            caption: '名称',
            codeName: 'name',
            columnType: 'DEFGRIDCOLUMN',
            noPrivDisplayMode: 1,
            width: 50,
            widthUnit: 'STAR',
            enableSort: true,
            id: 'name',
          },
          {
            clconvertMode: 'NONE',
            dataItemName: 'content',
            excelCaption: '内容',
            appDEFieldId: 'content',
            valueType: 'SIMPLE',
            aggMode: 'NONE',
            align: 'LEFT',
            caption: '内容',
            codeName: 'content',
            columnType: 'DEFGRIDCOLUMN',
            noPrivDisplayMode: 1,
            width: 100,
            widthUnit: 'STAR',
            id: 'content',
          },
          {
            clconvertMode: 'NONE',
            dataItemName: 'description',
            excelCaption: '描述',
            appDEFieldId: 'description',
            valueType: 'SIMPLE',
            aggMode: 'NONE',
            align: 'LEFT',
            caption: '描述',
            codeName: 'description',
            columnType: 'DEFGRIDCOLUMN',
            noPrivDisplayMode: 1,
            width: 100,
            widthUnit: 'STAR',
            enableSort: true,
            id: 'description',
          },
          {
            deuiactionGroup: {
              uiactionGroupDetails: [
                {
                  actionLevel: 100,
                  afterItemType: 'NONE',
                  beforeItemType: 'NONE',
                  buttonStyle: 'DEFAULT',
                  caption: '单选数据（主键）',
                  detailType: 'DEUIACTION',
                  uiactionId: 'single_data_key@master',
                  showCaption: true,
                  showIcon: true,
                  id: 'u150e91a',
                },
                {
                  actionLevel: 100,
                  afterItemType: 'NONE',
                  beforeItemType: 'NONE',
                  buttonStyle: 'DEFAULT',
                  caption: '单项数据',
                  detailType: 'DEUIACTION',
                  uiactionId: 'single_data@master',
                  showCaption: true,
                  showIcon: true,
                  id: 'u1f51398',
                },
                {
                  actionLevel: 100,
                  afterItemType: 'NONE',
                  beforeItemType: 'NONE',
                  buttonStyle: 'DEFAULT',
                  caption: '指定视图参数',
                  detailType: 'DEUIACTION',
                  uiactionId: 'specify_view_parameters@master',
                  showCaption: true,
                  showIcon: true,
                  id: 'u76b11c3',
                },
                {
                  actionLevel: 100,
                  afterItemType: 'NONE',
                  beforeItemType: 'NONE',
                  buttonStyle: 'DEFAULT',
                  caption: '输出选择数据',
                  detailType: 'DEUIACTION',
                  uiactionId: 'select_data@master',
                  showCaption: true,
                  showIcon: true,
                  id: 'u22e5b13',
                },
              ],
              appDataEntityId: 'web.master',
              uniqueTag: 'master__Aa91a49e130e83674cb',
              name: '事件及调用行为组',
              id: 'aa91a49e130e83674cb',
            },
            aggMode: 'NONE',
            align: 'RIGHT',
            caption: '操作',
            codeName: 'uagridcolumn1',
            columnType: 'UAGRIDCOLUMN',
            noPrivDisplayMode: 1,
            width: 400,
            widthUnit: 'PX',
            id: 'uagridcolumn1',
          },
        ],
        degridDataItems: [
          {
            appDEFieldId: 'name',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'name',
          },
          {
            appDEFieldId: 'content',
            valueType: 'SIMPLE',
            dataType: 21,
            id: 'content',
          },
          {
            appDEFieldId: 'description',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'description',
          },
          {
            appDEFieldId: 'id',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'srfkey',
          },
          {
            appDEFieldId: 'id',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'srfdataaccaction',
          },
          {
            appDEFieldId: 'region_id',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'region_id',
          },
          {
            appDEFieldId: 'category_type',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'srfdatatype',
          },
          {
            appDEFieldId: 'category_type',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'category_type',
          },
          {
            appDEFieldId: 'category_id',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'category_id',
          },
          {
            appDEFieldId: 'name',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'srfmajortext',
          },
          {
            appDEFieldId: 'wf_status',
            valueType: 'SIMPLE',
            dataType: 25,
            id: 'wf_status',
          },
        ],
        degridEditItems: [
          {
            caption: '标识',
            codeName: 'srfkey',
            enableCond: 3,
            appDEFieldId: 'id',
            editor: {
              editorType: 'HIDDEN',
              valueType: 'SIMPLE',
              editable: true,
              id: 'srfkey',
            },
            allowEmpty: true,
            id: 'srfkey',
          },
        ],
        pagingMode: 1,
        pagingSize: 10,
        sortMode: 'REMOTE',
        hasWFDataItems: true,
        enableCustomized: true,
        enablePagingBar: true,
        navViewPos: 'NONE',
        fetchControlAction: {
          appDEMethodId: 'fetch_default',
          appDataEntityId: 'web.master',
          id: 'fetch',
        },
        removeControlAction: {
          appDEMethodId: 'remove',
          appDataEntityId: 'web.master',
          id: 'remove',
        },
        autoLoad: true,
        showBusyIndicator: true,
        codeName: 'main17',
        controlType: 'GRID',
        logicName: '表格_事件及调用_表格',
        appDataEntityId: 'web.master',
        controlParam: {
          id: 'grid',
        },
        modelId: '1bb58406e5c6c5e7a8e5fe332c814802',
        modelType: 'PSDEGRID',
        name: 'grid',
        id: 'web.master.main17',
      },
      {
        searchButtonStyle: 'DEFAULT',
        deformPages: [
          {
            layout: {
              columnCount: 24,
              layout: 'TABLE_24COL',
            },
            caption: '常规条件',
            codeName: 'formpage1',
            detailStyle: 'DEFAULT',
            detailType: 'FORMPAGE',
            id: 'formpage1',
          },
        ],
        layout: {
          columnCount: 24,
          layout: 'TABLE_24COL',
        },
        tabHeaderPos: 'TOP',
        noTabHeader: true,
        autoLoad: true,
        showBusyIndicator: true,
        codeName: 'main80',
        controlType: 'SEARCHFORM',
        logicName: '表格_事件及调用_搜索表单',
        appDataEntityId: 'web.master',
        controlParam: {
          id: 'searchform',
        },
        modelId: 'c7d09901b0fd23d864cddad9d203867b',
        modelType: 'PSDEFORM_SEARCHFORM',
        name: 'searchform',
        id: 'web.master.main80',
      },
      {
        groupMode: 'SINGLE',
        controlType: 'SEARCHBAR',
        appDataEntityId: 'web.master',
        controlParam: {
          id: 'searchbar',
        },
        id: 'searchbar',
      },
      {
        capLanguageRes: {
          lanResTag: 'DE.LNAME.MASTER',
        },
        caption: '表格_基础事件',
        codeName: 'grid_logic_base_captionbar',
        controlType: 'CAPTIONBAR',
        appDataEntityId: 'web.master',
        controlParam: {},
        name: 'captionbar',
        id: 'grid_logic_base_captionbar',
      },
    ],
    codeName: 'usr0624113469',
    controlType: 'VIEWLAYOUTPANEL',
    logicName: 'grid_logic表格视图布局',
    appDataEntityId: 'web.master',
    controlLogics: [
      {
        eventNames: 'onChange',
        itemName: 'is_hide',
        logicTag: 'layoutpanel',
        logicType: 'SCRIPT',
        scriptCode:
          "console.log(view);\r\nconst is_hide = view.layoutPanel.panelItems.is_hide.value;\r\nconst grid = view.layoutPanel.panelItems.grid.control;\r\nconst columnStates = grid.state.columnStates;\r\nconst cols = ['description'];\r\nif(is_hide == 1){\r\n    columnStates.forEach((item) => {\r\n    if (cols.includes(item.key)) {\r\n        item.hidden = true\r\n    }\r\n})\r\n}\r\nelse\r\n{\r\n    columnStates.forEach((item) => {\r\n    if (cols.includes(item.key)) {\r\n        item.hidden = false\r\n    }\r\n})\r\n};\r\ngrid.calcColumnFixed();\r\ngrid.saveColumnStates();",
        triggerType: 'CTRLEVENT',
        id: 'logic',
      },
    ],
    controlParam: {},
    modelId: '4b3572631563ab9532e82f600063d946',
    modelType: 'PSSYSVIEWLAYOUTPANEL',
    name: 'layoutpanel',
    id: 'usr0624113469',
  },
  title: '表格_基础事件',
  viewStyle: 'DEFAULT',
  viewType: 'DEGRIDVIEW',
  enableDP: true,
  showCaptionBar: false,
  modelId: '59d2608253b173a549a060611f0060bc',
  modelType: 'PSAPPDEVIEW',
  name: 'MASTERgrid_logic_base',
  id: 'web.master_grid_logic_base',
};
